<%@page import="edu.scu.declaresys.config.Configs"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="java.util.*" import="edu.scu.declaresys.vo.*"
	import="edu.scu.declaresys.config.*"
	import="edu.scu.declaresys.web.util.*;"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<%
	String load = (String) request
			.getAttribute(IAttrName.LOAD_NEWS_FLAG);
	request.removeAttribute(IAttrName.LOAD_NEWS_FLAG);
	if (load == null) {
		response.sendRedirect(IActionName.INDEX_NEWS);
	}

	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	//
	// get news.
	//
	List<News> bulletinNews = (List<News>) request
			.getAttribute(NewsClass.BULLETIN_BOARD);
	List<News> fundNews = (List<News>) request
			.getAttribute(NewsClass.FUND_NEWS);
	List<News> declareProcess = (List<News>) request
			.getAttribute(NewsClass.DECLARE_PROCESS);
	List<News> projectNews = (List<News>) request
			.getAttribute(NewsClass.PROJECT_NEWS);

	User user = (User) session.getAttribute(User.T_TABLE);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>两项资金申报系统</title>
<link rel="stylesheet" href="css/index.css" type="text/css"></link>
<link rel="stylesheet" href="css/comm.css" type="text/css"></link>
<script type="text/javascript" src="js/newscroll.js"></script>
</head>
<body>
	<jsp:include page="/jsp/template/pageHead.jsp" />
	<div class="ad">
		<div class="notice">
			<div class="notice_head">
				<span class="notice_style">电子公告</span>
				<span class="more">
					<a href="<%=IActionName.NEWS_LIST%>?<%=News.T_NEWS_CLASS_ID%>=<%=NewsClass.BULLETIN_BOARD_ID%>">more</a>
				</span>
			</div>
			<MARQUEE id="m1" class="marquee_style" direction="up"
				behavior="scroll" scrollamount="3" onmousemove="m1.stop();"
				onmouseout="m1.start();">
			<div class="notice_body">
				<ul>
					<%
						if (bulletinNews != null) {

							Iterator<News> iter = bulletinNews.iterator();
							while (iter.hasNext()) {
								News news = iter.next();
					%>
					<li class="index-bulletinNews"><img
						src="css/img/notice_point.jpg" alt="电子公告" /> <%
 	out.write("<a href=\"newsDetail.action?id=" + news.getId()
 					+ "\"> " + news.getTitle() + "</a>");
 %>
					</li>
					<%
						}
						}
					%>
				</ul>
			</div>
			</MARQUEE>
		</div>
		<div class="news">
			<div class="news1">
				<div class="news_head">
					<span class="notice_style">两资新闻</span><span class="more">
						<a href="<%=IActionName.NEWS_LIST%>?<%=News.T_NEWS_CLASS_ID%>=<%=NewsClass.FUND_NEWS_ID%>">more</a> </span>
				</div>
				<div class="news_body">
					<ul>
						<%
							if (fundNews != null) {

								Iterator<News> iter = fundNews.iterator();
								while (iter.hasNext()) {
									News news = iter.next();
						%>
						<li class="index-fundNews">
							<%
								out.write("• " + "<a href=\"newsDetail.action?id="
												+ news.getId() + "\"> " + news.getTitle() + "</a>");
							%> <span class="time_style">[<%
 	out.print(news.getPublishTime().toString().substring(0, 10));
 %>]</span>
						</li>
						<%
							}
							}
						%>

					</ul>
				</div>
			</div>
			<div class="news2">
				<div class="news_head">
					<span class="notice_style">项目公示</span><span class="more">
					<a href="<%=IActionName.NEWS_LIST%>?<%=News.T_NEWS_CLASS_ID%>=<%=NewsClass.PROJECT_NEWS_ID%>">more</a> </span>
				</div>
				<div class="news_body">
					<ul>
						<%
							if (projectNews != null) {

								Iterator<News> iter = projectNews.iterator();
								while (iter.hasNext()) {
									News news = iter.next();
						%>
						<li class="index-fundNews">
							<%
								out.write("• " + "<a href=\"newsDetail.action?id="
												+ news.getId() + "\"> " + news.getTitle() + "</a>");
							%> <span class="time_style">[<%
 	out.print(news.getPublishTime().toString().substring(0, 10));
 %>]</span>
						</li>
						<%
							}
							}
						%>
					</ul>
				</div>
			</div>
		</div>
		<div class="pic_show">
			<div class="pic_show1">
				<div class="pic_show2_head">
					<span class="notice_style">项目跟踪报道</span>
				</div>
				<div class="pic_show2_body">
					<div id="headlineLayer" class="headlineLayer">
						<table id='headline1'>
							<td><a href="#" target="_blank"><img src=css/img/1.JPG
									width="208" height="175">
							</a>
							</td>
						</table>
					</div>
					<table id='headline4' style='display:none'>
						<td><a href="#" target="_blank"><img src=css/img/2.JPG
								width="208" height="175">
						</a></td>
					</table>
					<table id='headline2' style='display:none'>
						<td><a href="/jscss/" target="_blank"><img
								src=css/img/5.JPG width="208" height="175">
						</a></td>
					</table>
					<table id='headline3' style='display:none'>
						<td><a href="#" target="_blank"><img src=css/img/3.JPG
								width="208" height="175">
						</a></td>
					</table>
				</div>
			</div>
			<div class="pic_show2">
				<div class="pic_show2_head">
					<span class="notice_style">项目申报流程</span><span class="more">
						<a href="<%=IActionName.NEWS_LIST%>?<%=News.T_NEWS_CLASS_ID%>=<%=NewsClass.DECLARE_PROCESS_ID%>">more</a> </span>
				</div>
				<div class="pic_show2_body">
					<ul>
						<%
							if (declareProcess != null) {

								Iterator<News> iter = declareProcess.iterator();
								while (iter.hasNext()) {
									News news = iter.next();
						%>
						<li class="index-fundNews">
							<%
								out.write("• " + "<a href=\"newsDetail.action?id="
												+ news.getId() + "\"> " + news.getTitle() + "</a>");
							%> <span class="time_style">[<%
 	out.print(news.getPublishTime().toString().substring(0, 10));
 %>]</span>
						</li>
						<%
							}
							}
						%>
					</ul>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
